﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Theme="SkinFile"
CodeBehind="TranslateNewMatchSentences.aspx.cs" Inherits="Nivdal.TranslateNewMatchSentences" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceHolder" runat="server">
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="basic_element">
    <div class="red_title">
       <asp:Label ID="Label1" runat="server" Text="Translate >> translate match sentences" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">
        <asp:HiddenField ID="LanguageHiddenField" runat="server" />
        <asp:UpdatePanel ID="TranslateUpdatePanel" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
        <asp:Panel ID="DirectionPanel" runat="server" Direction="LeftToRight">
            <asp:FormView ID="StatusForumView" runat="server" DataSourceID="TranslationStatusDataSourse">
                <ItemTemplate>
                    <asp:Label ID="TranslationTitleLabel" runat="server" Text="Match sentences translation (new)" SkinID="TeamNameLabel"></asp:Label>
                    <div style="width:20px; height:20px; padding:2px;">
                        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="TranslateUpdatePanel">
                            <ProgressTemplate>
                                <asp:Image ID="ProgressImage" runat="server" ImageUrl="~/Images/ajax-loader.gif" />
                            </ProgressTemplate>
                        </asp:UpdateProgress>
                    </div>
                    <asp:Label ID="LanguageDefinitionLabel" runat="server" Text='<%# TranslationLanguageString(Eval("LanguageName")) %>' SkinID="InfoLabel"></asp:Label>
                    <br />
                    <asp:Label ID="StatusTitleLabel" runat="server" Text="<%$ Resources:Resource, Translate_StatusTitleLabelText %>"
                     SkinID="InfoLabel"></asp:Label>
                     &nbsp;
                    <asp:Label ID="TranslationStatusLabel" runat="server" Text='<%# Eval("TranslationStatus") %>' SkinID="GridLabel"></asp:Label>
                     <br />
                    <asp:HyperLink ID="ToTranslationHomePage" runat="server" Text="Back to translation home page"
                     NavigateUrl="~/TranslateMaster.aspx" SkinID="GreenTitleHyperLink"></asp:HyperLink>
                </ItemTemplate>
            </asp:FormView>
            <asp:Label ID="MessageLabel" runat="server" SkinID="GreenSmallHeaderLabel"></asp:Label>
            <br />
            <asp:Panel ID="TranslatePanel" runat="server">
                <asp:HiddenField ID="SentenceIdHiddenField" runat="server" />
                <asp:Label ID="SentenceDescriptionTitleLabel" runat="server" Text="Sentence description" SkinID="InfoLabel"></asp:Label>
                <br />
                <asp:Label ID="SentenceDescriptionLabel" runat="server" SkinID="GridLabel"></asp:Label>
                <br />
                <br />
                <asp:Repeater ID="SentencePartsRepeater" runat="server" DataSourceID="SentencePartsDataSource">
                <HeaderTemplate>
                    <table style="width:90%">
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td colspan="2">
                            <asp:HiddenField ID="PartIdHiddenField" runat="server" Value='<%# Eval("Id") %>' />
                            <asp:Label ID="PartTextLabel" runat="server" Text="" SkinID="GridLabel"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="width:70%;">
                            <asp:Label ID="EnglishTextLabel" runat="server" Text='<%# Eval("Text") %>' SkinID="GridLabel"></asp:Label>
                            <br />
                            <CustomControls:TextArea ID="TranslateTextBox" runat="server" Width="300" Height="80" 
                            TextMode="MultiLine" MaxLength="256"></CustomControls:TextArea>
                        </td>
                        <td style="width:30%; vertical-align:middle;">
                            <asp:DropDownList ID="SeparatorsDDL" runat="server" DataSourceID="SeparatorsDataSource" 
                            DataTextField="PartDescription" DataValueField="Id" SelectedValue='<%# Eval("SeparatorId") %>'></asp:DropDownList>
                            <asp:SqlDataSource ID="SeparatorsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                            SelectCommand="Nivdal_GetAllNewMatchSentencesSeparators" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                        </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
                </asp:Repeater>
                <asp:Button ID="SubmitButton" runat="server" Text="<%$ Resources:Resource, Global_Submit %>" OnClick="SubmitTranslation"
                 CssClass="GreenSmallButtonStyle" OnClientClick="return confirm('are you sure you want to submit this translation?')" />
                 &nbsp;&nbsp;
                <asp:Button ID="IgnoreButton" runat="server" Text="Ignore" CssClass="GreySmallButtonStyle" 
                OnClientClick="return confirm('Ignire this sentence for a while?')" OnClick="IgnoreSentence" />
            </asp:Panel>
            <br /><br />
            <asp:HyperLink ID="AllTranslatedSentences" runat="server" Text="All translated and ignored sentences"
             SkinID="GreenTitleHyperLink" NavigateUrl="~/TranslatedNewMatchSentences.aspx"></asp:HyperLink>
            <asp:SqlDataSource ID="TranslationStatusDataSourse" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
              SelectCommand="Nivdal_GetNewMatchSentencesTranslationStatusForUser" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
              <asp:SqlDataSource ID="SentencePartsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
              SelectCommand="Nivdal_GetNewMatchSentenceForTranslation" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
        </asp:Panel>
        </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="PageNameLabel" runat="server" Text="Translate >> translate match sentences" CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>